<template>
</template>

<script>

export default {

    methods: {
        getMethod(row) {
            if (row.id) {
                let id = row.id
                deleteInvitePerson({ id: id }).then(res => {
                    console.log(res)
                    if (res.code == 200) {
                        console.log(this.saveAllDto.personInfoList);
                        this.saveAllDto.personInfoList = this.saveAllDto.personInfoList.filter(item => item.id !== id);
                        this.$pop('删除成功!')
                    }
                })
                    .catch((e) => {
                        console.log(e);
                    });
            } else {
                this.saveAllDto.personInfoList = this.saveAllDto.personInfoList.filter(item => item.frontFileId !== row.frontFileId);
                this.$pop('删除成功!');
            }
        },

        postMethod() {
            let data = {
                id: this.form.id,
                status: this.auditStatus,
                opinion: this.auditOpinion,
                applyType: 'INVITATION_APPLY',
                activeAgencyRoleGroup: this.form.activeAgencyRoleGroup,
                activeAgencyType: this.form.activeAgencyType
            }
            this.loading = true
            batchAudit(data)
                .then(res => {
                    if (res.code === 200) {
                        this.$success('审核成功')
                        this.auditOpinion = ''
                        if (this.$route.query.listNum == '1') {
                            this.$router.go(-2)
                        } else {
                            this.$router.go(-1)
                        }
                    }
                })
                .catch(e => {
                    console.log(e)
                })
                .finally(() => {
                    this.loading = false
                })
        },

    }

}


</script>
